/**
 * 右侧导航
 */
define(function (require, exports, module) {
    var $ = require("jquery");
    var NavManager = require('plugins/navManager');

    return {
        init: function () {
            new NavManager($('#nav'), [
                {
                    "id": "menu_home",
                    "code": "",
                    "name": "首页",
                    "level": 1,
                    "iconCls": "icon-home",
                    "url": ["/page/home/home.shtml"],
                    "children": null
                },
                {
                    "id": "menu_building",
                    "code": "500301",
                    "name": "楼盘项目",
                    "level": 1,
                    "iconCls": "icon-building",
                    "url": ["/page/houses_project/houses_project.shtml"],
                    "children": null
                },
                {
                    "id": "menu_ditch_run",
                    "code": "",
                    "name": "渠道运营",
                    "level": 1,
                    "iconCls": "icon-ditch",
                    "url": "",
                    "children": [
                        {
                            "id": "menu_ditch_run_1",
                            "code": "50030601",
                            "name": "经纪人管理",
                            "level": 2,
                            "url": ['/page/intermediary_organ/broker.shtml']
                        },
                        {
                            "id": "menu_ditch_run_2",
                            "code": "50030607",
                            "name": "中介机构",
                            "level": 2,
                            "url": [
                                '/page/intermediary_organ/',
                                '/page/intermediary_organ/index.shtml'
                            ]
                        },
                        {
                            "id": "menu_ditch_run_3",
                            "code": "500805",
                            "name": "小蜜蜂",
                            "level": 2,
                            "target": "_blank",
                            "url": ['/api/index.php?r=site/redirect-to&page=tfans_init']
                        },
                        {
                            "id": "menu_ditch_run_4",
                            "code": "50030606",
                            "name": "下线经纪人",
                            "level": 2,
                            "url": ['/page/intermediary_organ/invitation_broker.shtml']
                        }
                    ]
                },
                {
                    "id": "menu_ditch_manage",
                    "code": "",
                    "name": "渠道管理",
                    "level": 1,
                    "iconCls": "icon-ditchManage",
                    "url": "",
                    "children": [
                        {
                            "id": "menu_ditch_manage_5",
                            "code": "500701",
                            "name": "规则管理",
                            "level": 2,
                            "target": "_blank",
                            "url": ["/api/index.php?r=site/redirect-to&page=clueInit"]
                        },
                        {
                            "id": "menu_ditch_manage_6",
                            "code": "500702",
                            "name": "判客分配",
                            "level": 2,
                            "target": "_blank",
                            "url": ["/api/index.php?r=site/redirect-to&page=clueAdmin"]
                        },
                        {
                            "id": "menu_ditch_manage_3",
                            "code": "50030608",
                            "name": "客户管理",
                            "level": 2,
                            "url": ['/page/customer_management/customer_management.shtml']
                        },
                        {
                            "id": "menu_ditch_manage_4",
                            "code": "50032202",
                            "name": "申诉处理",
                            "level": 2,
                            "url": ['/page/customer_management/complaint_management.shtml']
                        },
                        {
                            "id": "menu_ditch_manage_5",
                            "code": "50032202",
                            "name": "渠道来源",
                            "level": 2,
                            "url": ['/page/ditch/source.shtml']
                        }
                    ]
                },
                {
                    "id": "menu_commission",
                    "code": "50030605",
                    "name": "佣金管理",
                    "level": 1,
                    "iconCls": "icon-commission",
                    "url": "",
                    "children": [
                        {
                            "id": "menu_commission_1",
                            "code": "50030605",
                            "name": "个人佣金",
                            "level": 2,
                            "url": ["/page/brokerage/index.shtml"]
                        },
                        {
                            "id": "menu_commission_2",
                            "code": "50030605",
                            "name": "邀请奖励",
                            "level": 2,
                            "url": ["/page/encouragement/index.shtml"]
                        },
                        {
                            "id": "menu_commission_3",
                            "code": "50030605",
                            "name": "机构佣金",
                            "level": 2,
                            "url": ["/page/brokerage/agency.shtml"]
                        }
                    ]
                },
                {
                    "id": "menu_data",
                    "code": "500307",
                    "name": "数据中心",
                    "level": 1,
                    "iconCls": "icon-data",
                    "url": "",
                    "children": [
                        {
                            "id": "menu_data_4",
                            "code": "50030705",
                            "name": "经纪人增长",
                            "level": 2,
                            "url": ["/page/reports/broker-increase.shtml"]
                        },
                        {
                            "id": "menu_data_4_2",
                            "code": "50030706",
                            "name": "拓客质量",
                            "level": 2,
                            "url": ["/page/reports/broker-quality.shtml"]
                        },
                        {
                            "id": "menu_data_2",
                            "code": "50030702",
                            "name": "客户增长",
                            "level": 2,
                            "url": ["/page/reports/client-increase.shtml"]
                        },
                        {
                            "id": "menu_data_3",
                            "code": "50030704",
                            "name": "客户转化",
                            "level": 2,
                            "url": ["/page/reports/client-convert.shtml"]
                        },
                        {
                            "id": "menu_data_5",
                            "code": "50030707",
                            "name": "经纪人佣金",
                            "level": 2,
                            "url": ["/page/reports/brokerage.shtml"]
                        },
                        {
                            "id": "menu_data_6",
                            "code": "50030708",
                            "name": "下线经纪人",
                            "level": 2,
                            "url": ["/page/reports/invite-broker.shtml"]
                        },
                        {
                            "id": "menu_data_7",
                            "code": "50030703",
                            "name": "成交统计",
                            "level": 2,
                            "url": ["/page/reports/deal.shtml"]
                        },
                        {
                            "id": "menu_021_1",
                            "code": "50030711",
                            "name": "粉丝数据",
                            "level": 2,
                            "url": ["/page/maintenance/fans-analyse.shtml"]
                        }
                    ]
                },
                {
                    "id": "menu_finance",
                    "code": "",
                    "name": "财务中心",
                    "level": 1,
                    "iconCls": "icon-finance",
                    "url": "",
                    "children": [
                        {
                            "id": "menu_finance_1",
                            "code": "50031101",
                            "name": "收支对账",
                            "level": 2,
                            "url": ["/page/finance/accounts.shtml"]
                        },
                        {
                            "id": "menu_finance_2",
                            "code": "50031102",
                            "name": "委托代付",
                            "level": 2,
                            "url": ["/page/finance/entrust-pay/index.shtml"]
                        }
                    ]
                },
                {
                    "id": "menu_set",
                    "code": "",
                    "name": "基础配置",
                    "level": 1,
                    "iconCls": "icon-set",
                    "url": "",
                    "children": [
                        {
                            "id": "menu_set_1",
                            "code": "500309",
                            "name": "内容配置",
                            "level": 2,
                            "url": ["/page/config/content/kfs-setting.shtml", "/page/config/content/building_setting.shtml?proj_id={placeholder_}", "/page/config/content/style-setting.shtml", "/page/config/content/city-mng.shtml",
                                "/page/config/content/knowledge_mng.shtml"]
                        },
                        {
                            "id": "menu_set_2",
                            "code": "500302",
                            "name": "参数设置",
                            "level": 2,
                            "url": [
                                "/page/parameter_settings/public.shtml",
                                "/page/parameter_settings/project.shtml"
                            ]
                        },
                        {
                            "id": "menu_set_5",
                            "code": "50030802",
                            "name": "定制页面",
                            "level": 2,
                            "url": ['/page/custom-page/index.shtml']
                        }
                    ]
                },
                {
                    "id": "menu_020",
                    "code": "",
                    "name": "O2O应用",
                    "level": 1,
                    "iconCls": "icon-020",
                    "url": "",
                    "children": [
                        {
                            "id": "menu_020_10",
                            "code": "50040401",
                            "name": "认筹理财",
                            "level": 2,
                            "url": ["/page/raise_finance/activities.shtml#/list"]
                        },
                        {
                            "id": "menu_020_2",
                            "code":"50040102",
                            "name": "O2O互动游戏",
                            "level": 2,
                            "target": "_blank",
                            "url": ['/api/index.php?r=site/redirect-to&page=wls']
                        },
                        {
                            "id": "menu_020_3",
                            "code": "500101",
                            "name": "微楼书（新版）",
                            "level": 2,
                            "target": "_blank",
                            "url": ['/api/index.php?r=site/redirect-to&page=wls']
                        },
                        {
                            "id": "menu_020_4",
                            "code": "500101",
                            "name": "微楼书（旧版）",
                            "level": 2,
                            "target": "_blank",
                            "url": ['/api/index.php?r=site/redirect-to&page=wls1']
                        },
                        //{
                        //    "id": "menu_020_5",
                        //    "code": "",
                        //    "name": "微场景",
                        //    "level": 2,
                        //    "url": ["/page/o2o_application/micro_scene.shtml"]
                        //},
                        {
                            "id": "menu_020_6",
                            "code": "50040202",
                            "name": "一键拨号",
                            "level": 2,
                            "url": ["/page/o2o_application/speed_dial.shtml"]
                        },
                        {
                            "id": "menu_020_7",
                            "code": "50040201",
                            "name": "税费计算器",
                            "level": 2,
                            "url": ["/page/o2o_application/tax_calculator.shtml"]
                        },
                        {
                            "id": "menu_020_8",
                            "code": "50040204",
                            "name": "360全景相册",
                            "level": 2,
                            "url": ["/page/o2o_application/album360.shtml", "/page/o2o_application/album360-edit.shtml"]
                        },
                        {
                            "id": "menu_020_9",
                            "code": "50040203",
                            "name": "普通相册",
                            "level": 2,
                            "url": ["/page/o2o_application/album.shtml"]
                        }
                    ]
                }
            ]);
        }
    }
});
